package week11;

import org.apache.spark.sql.Row;
import org.apache.spark.sql.SQLContext;
import org.apache.spark.sql.SparkSession;
import org.apache.spark.sql.execution.command.LeafRunnableCommand;
import org.apache.spark.sql.execution.command.RunnableCommand;
import scala.Enumeration;
import scala.collection.immutable.Map;
import scala.collection.immutable.Seq;

public class Week11Work implements LeafRunnableCommand {

    // public interface LeafRunnableCommand extends RunnableCommand, LeafLike<LogicalPlan>
    // https://spark.apache.org/
    // https://spark.apache.org/examples.html
    // https://github.com/apache/spark/tree/master/examples/src/main/java/org/apache/spark/examples
    // https://gitee.com/superhanliu2/geek_bigdata_learn/tree/master/zy11_end
    // https://gitee.com/superhanliu2/geek_bigdata_learn/tree/master/zy6_spark

    // https://spark.apache.org/docs/latest/sql-programming-guide.html
    // https://spark.apache.org/docs/latest/sql-getting-started.html
    // https://spark.apache.org/docs/latest/api/java/index.html
    // https://spark.apache.org/docs/latest/api/java/index.html

    @Override
    public Seq<Row> run(SparkSession sparkSession) {
        Map<String, String> confMap = sparkSession.conf().getAll();
        System.out.println("confMap: " + confMap);
        SQLContext sqlContext = sparkSession.sqlContext();
        Map<String, String> sqlContextConfMap = sqlContext.getAllConfs();
        System.out.println(" sqlContextConfMap: " + sqlContextConfMap);



        return null;
    }

    @Override
    public void org$apache$spark$sql$catalyst$plans$logical$Command$_setter_$nodePatterns_$eq(Seq<Enumeration.Value> x$1) {

    }

    @Override
    public Seq<Enumeration.Value> nodePatterns() {
        return null;
    }
}
